package com.example.demo.OneToOne.service.Impl;

import com.example.demo.OneToOne.Repository.CardRepository;
import com.example.demo.OneToOne.entity.Card;
import com.example.demo.OneToOne.service.CardService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class CardServiceImpl implements CardService {

    @Autowired
    private CardRepository cardRepository;
    @Override
    public List<Card> getCardlist(){
        return cardRepository.findAll();
    }

    @Override
    public Card findCardById(long id){
        return cardRepository.findById(id);
    }
}
